from sklearn.preprocessing import MinMaxScaler
import numpy as np
a = np.array([1,3,5,3,8])

# 最大最小值归一化
scaler = MinMaxScaler()
# a.reshape(-1,1)变成列向量
print(scaler.fit_transform(a.reshape(-1,1)))
# fit_transform（）归一化转换
